# -*- coding:utf-8 -*-
from com.mat.rpa.utils.globalConstants import GlobalConstants
from com.mat.rpa.views.workWindow.leftPanel.directiveTree import treeItem
from . import NLPOperationConstants
class NLPOperationSubDirectiveTree(treeItem.TreeItemWithID):
    def __init__(self, parent):
        super(NLPOperationSubDirectiveTree, self).__init__(parent)
        self.createNLPOperationnSubTreeNode()

    def createNLPOperationnSubTreeNode(self):
        self.nodeType = GlobalConstants.treeBranchType
        self.directiveType = "NLPOperation"
        self.setText(0, "自然语言处理NLP")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, NLPOperationConstants.NLPOperationConstants.textSegmentationDirective, "文本分词")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, NLPOperationConstants.NLPOperationConstants.entityExtractionDirective, "实体抽取")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, NLPOperationConstants.NLPOperationConstants.emotionalInclinationAnalysisDirective, "情感倾向分析")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, NLPOperationConstants.NLPOperationConstants.textSimilarityAnalysisDirective, "文本相似度分析")